package logic.p7_commonClass;

import org.junit.Test;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;

/**
 * @ClassName: Java
 * @description:
 * @author: zxf
 * @create: 2021-06-13 11:15
 **/
public class DateTest {

    @Test
    public void dateTest(){
        TimeZone tz = TimeZone.getDefault();
        System.out.println(tz.getID());
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM`-dd hh-mm-ss");
        System.out.println(sdf.format(calendar.getTime()));
    }
}

